<?php

namespace App\Models;


class Withdraw extends Base
{
    protected $table = 'withdraws';

    const STATUS_TO_DO = 0;
    const STATUS_ING = 1;
    const STATUS_SUCCESS = 2;
    const STATUS_FAIL = 3;

    const TYPE_DA_REN = 1;
    const TYPE_USER = 2;

    protected $appends = ['amount_yuan', 'balance_yuan'];

    public function getAmountYuanAttribute() {
        return format_yuan($this->amount);
    }

    public function getBalanceYuanAttribute() {
        return format_yuan($this->balance);
    }


}
